package com.junmeng.jdemo.recycler.chat.contextmenu;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class MenuInfoManager {
    private static HashMap<Integer, MenuInfo> menus = new HashMap<>();

    static {
        menus.put(MenuInfo.MenuId.COPY, MenuInfo.createMenuInfo(MenuInfo.MenuId.COPY));
        menus.put(MenuInfo.MenuId.FORWARD, MenuInfo.createMenuInfo(MenuInfo.MenuId.FORWARD));
    }

    public static HashMap<Integer, MenuInfo> getMenuInfos() {
        return menus;
    }

    public static List<MenuInfo> getMenuInfos(List<Integer> menuIds) {
        List<MenuInfo> dd = new ArrayList<>();
        for (Integer id : menuIds) {
            MenuInfo info = menus.get(id);
            if (info != null) {
                dd.add(menus.get(id));
            }
        }
        return dd;
    }
}
